home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 257 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: cs.mu.OZ.AU!bounce-back
  2. From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: new T[0] and sizeof(T)
  5. Date: 03 Feb 96 14:46:13 GMT
  6. Organization: Comp Sci, University of Melbourne
  7. Approved: fjh@cs.mu.oz.au
  8. Message-ID: <4evjke$87h@mulga.cs.mu.OZ.AU>
  9. References: <1996Feb1.091641.4676@iiasa.ac.at> <4erovm$4hh@engnews1.Eng.Sun.COM>
  10. NNTP-Posting-Host: munta.cs.mu.oz.au
  11. X-Original-Date: 3 Feb 1996 12:15:10 GMT
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMRN1QOEDnX0m9pzZAQFhqgF/UDbi+EELX0PUIvUqTebjKPXv5+yY+GfQ
  14.     qyJWtBMev/rKvejU3fR05MPWlcDNGt46
  15.     =Uazw
  16. Originator: fjh@munta.cs.mu.OZ.AU
  17.  
  18. clamage@Eng.Sun.COM (Steve Clamage) writes:
  19.  
  20. >The expression "new T[0]" is invalid, but if you
  21. >use a non-const expression for the count, it is OK if the value is zero.
  22.  
  23. What makes you think that the expression `new T[0]' is invalid?
  24. As I read the working paper, it seems perfectly legal, and the
  25. three compilers I tried it on were all quite happy to accept it.
  26.  
  27. --
  28. Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  29. fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  30. ---
  31. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  32.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  33.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  34.